﻿<UserControl x:Class="testapp.Views.MainView"
             xmlns:data="clr-namespace:testapp.ViewModels"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Loaded="UserControl_Loaded_1">
    <UserControl.Resources>
        <CollectionViewSource x:Key="mainViewModelViewSource"
                              d:DesignSource="{d:DesignInstance {x:Type data:MainViewModel}, CreateList=True}" />
    </UserControl.Resources>

    <!--<UserControl.Resources>
        <data:MainViewModel x:Key="ViewModel"/>
    </UserControl.Resources>-->
    
    
    <Grid DataContext="{StaticResource mainViewModelViewSource}">
        <Grid.RowDefinitions>
            <RowDefinition Height="6*" />
            <RowDefinition Height="19*" />
        </Grid.RowDefinitions>
        <TextBox x:Name="txtbox"  
                 HorizontalAlignment="Left" Height="23"
                 Margin="112,17,0,0"
                 TextWrapping="Wrap" 
                 VerticalAlignment="Top" Width="120"
                 Grid.Row="1"
                 Text="{Binding Diameter, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />


    </Grid>
</UserControl>
